package com.wyp.mapper;

import com.wyp.pojo.Questions;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Repository
public interface QuestionsMapper {

    public int GetQuestionsCount();

    //返回所有题目信息给前端页面
    public List<Map<String,Object>> qureyAllQuestions();

    //查找题目
    public List<Map<String,Object>> qureyQuestionsByMessage(@Param("message") String message,@Param("apartmentid") int apartmentid);//根据关键信息查询
    public List<Map<String,Object>> qureyQuestionsByApartmentname(int apartmentid);
    public Map<String,Object> qureyQuestionsByid(int questiontid);
    public List<Map<String,Object>> qureyQuestionsByType(@Param("type") int type,@Param("apartmentid") int apartmentid);


    //添加题目
    public int addQuestions(Questions questions);

    //更新题目
    public int updateQuestions(Questions questions);
}
